/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package mvc;

import java.util.Objects;
import javax.json.JsonObject;

/**
 *
 * @author William
 */
public abstract class DatabaseEvent implements Event {

    private final String name;

    public DatabaseEvent(String name) {
        this.name = name;
    }

    @Override
    public String getName() {
        return this.name;
    }

    public void configureDatabase(JsonObject params) {
        throw new UnsupportedOperationException("Not implemented yet.");
    }

    public JsonObject getConfiguration() {
        throw new UnsupportedOperationException("Not implemented yet.");
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 41 * hash + Objects.hashCode(this.name);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final DatabaseEvent other = (DatabaseEvent) obj;
        if (!Objects.equals(this.name, other.name)) {
            return false;
        }
        return true;
    }

}
